package com.example.mapper;

import com.example.dto.RepairPageDto;
import com.example.entity.Repair;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface RepairMapper {
    Page<Repair> getByDnoWithPno(RepairPageDto repairPageDto);

    @Insert("insert into repair (dno, pno, rsubmit, rsolve, rreason) VALUE " +
            "(#{dno},#{pno},#{rsubmit},#{rsolve},#{rreason})")
    void add(Repair repair);
    @Delete("delete from repair where dno = #{dno} and pno = #{pno}")
    void deleteByDno(String dno,String pno);

    void update(Repair repair);
}
